package com.haisen.service.impl;

import com.haisen.core.utils.PageResultSet;
import com.haisen.dataobject.entity.Bill;
import com.haisen.dataobject.entity.BillCategory;
import com.haisen.dataobject.mapper.base.BillCategoryMapper;
import com.haisen.dataobject.query.BillQuery;
import com.haisen.service.BillCategroyService;
import com.haisen.service.BillService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class BillCategoryServiceImpl implements BillCategroyService {

    @Autowired
    private BillCategoryMapper billCategoryMapper;


    @Override
    public void create(BillCategory billCategory) {
        billCategoryMapper.insertSelective(billCategory);
    }

    @Override
    public void update(BillCategory billCategory) {
       billCategoryMapper.updateByPrimaryKey(billCategory);
    }

    @Override
    public void delete(Integer id) {
       billCategoryMapper.deleteByPrimaryKey(id);
    }

    @Override
    public List<BillCategory> findAll() {
        return billCategoryMapper.selectAll();
    }
}
